<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>${_title}</title>

    <!-- Bootstrap core CSS -->

    <link href="${_css}/bootstrap.min.css" rel="stylesheet">

    <link href="${_font}/css/font-awesome.min.css" rel="stylesheet">
    <link href="${_css}/animate.min.css" rel="stylesheet">

    <!-- Custom styling plus plugins -->
    <link href="${_css}/custom.css" rel="stylesheet">
    <link href="${_css}/icheck/flat/green.css" rel="stylesheet">

    <!-- editor -->
    <link href="http://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet">
    <link href="${_css}/editor/external/google-code-prettify/prettify.css" rel="stylesheet">
    <link href="${_css}/editor/index.css" rel="stylesheet">

    <!-- switchery -->
    <link rel="stylesheet" href="${_css}/switchery/switchery.min.css" />

    <script src="${_js}/jquery.min.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->

</head>


<body style="background: #F7F7F7;">
<div class="">
    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
                <div class="x_title">
                    <h2>SEO设置</h2>
                    <div class="clearfix"></div>
                </div>
                <div class="x_content">

                    <form class="form-horizontal form-label-left" novalidate>
                        <div class="item form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="contant">
                        		<b>标题附加字：</b>
                        		<span class="required">*</span>
                            </label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                            	<input id="contant" class="form-control col-md-7 col-xs-12" value=""
                            	name="contant" placeholder="输入标题附加字" required="required" type="text">
                            	网页标题通常是搜索引擎关注的重点，本附加字设置将出现在标题中论坛名称的后面，如果有多个关键字，建议用"|"、","（不含引号）等符号分隔
                            </div>
                        </div>
                        <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12"  for="keyword">
                        			<b>Meta Keywords：</b>
                        			<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                            	<input id="keyword" class="form-control col-md-7 col-xs-12" value=""
                            	name="keyword" placeholder="输入关键字" required="required" type="text">
                            	keywords项出现在页面头部的Meta标签中，用于记录本页面的关键字，多个关键字间请用半角都好","隔开
                            </div>
                            </div>    
                        <div class="item form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="description">
                        		<b>Meta Description：</b>
                        		<span class="required">*</span>
                            </label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                            	<input id="description" class="form-control col-md-7 col-xs-12" value=""
	                                name="description" placeholder="输入Meta Description" required="required" type="text">
	                                Description出现在页面头部的Meta标签中，用于记录本页面的概要与描述
                            </div>
                        </div>
                        <div class="item form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="headInfo">
                            	<b>其他头部信息：</b>
                            </label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
								<textarea id="headInfo" required="required" name="headInfo" class="form-control col-md-7 col-xs-12">
									
								</textarea>
								如需在<head></head>中添加其他的HTML，可以使用本设置，否则请留空如需在<head></head>中添加其他的HTML，可以使用本设置，否则请留空
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
	</div>
	  
    <div class="row">
		<div class="col-md-12 col-sm-12 col-xs-12">
		    <div class="ln_solid"></div>
		    <div class="form-group">
		        <div class="col-md-12 col-md-offset-5">
		            <button id="send" type="button" class="btn btn-success">保存</button>
		        </div>
		    </div>			
		</div>
	</div> 
   	
</div>
    <script src="${_js}/bootstrap.min.js"></script>
    <!-- bootstrap progress js -->
	<script src="${_js}/progressbar/bootstrap-progressbar.min.js" type="text/javascript"></script>
	<script src="${_js}/nicescroll/jquery.nicescroll.min.js" type="text/javascript"></script>
    <!-- icheck -->
    <script src="${_js}/icheck/icheck.min.js"></script>
    
	<script src="${_js}/custom.js" type="text/javascript"></script>
            
	 <!-- PNotify -->
	<script src="${_js}/notify/pnotify.core.js" type="text/javascript"></script>
	<script src="${_js}/notify/pnotify.buttons.js" type="text/javascript"></script>
	<script src="${_js}/notify/pnotify.nonblock.js" type="text/javascript" ></script>   
	
    <script type="text/javascript">
        
		$(".btn-success").click(function(){
			var contant = $.trim($('#contant').val());
			var keyword = $.trim($("#keyword").val());
			var description = $.trim($("#description").val());
			var headInfo = $.trim($("#headInfo").val());
			var info=JSON.stringify({
				contant:contant,
				keyword:keyword,
				description:description,
				headInfo:headInfo
			});
			$.ajax({
	            type: 'POST',
	            dataType: 'JSON',
	            async:'false',
	            headers: {'Content-type': 'application/json;charset=UTF-8'},
	            url: '/admin/seo/save',
	            data:info,
	            success: function(result){
	       		  if(result.code==-1){
	            		new PNotify({
			            	title: '操作提示',
			            	text: '保存成功',
			            	delay: 3e3,
			            	type: 'success'
			        	});
	       		  }else{
	       		  		if(result.code == 0){
			        		alert("请先登录！");
							top.location.href = "/admin/login";
			        	}else{
		            		new PNotify({
				            	title: '操作提示',
				            	text: result.msg,
				            	delay: 3e3,
				            	type: 'error'
				        	});  
			        	}     		  	
	       		  }
	            }
		    })	
			
		});
    </script>
</body>

</html>